package com.daotingli.backendprograms.Controller.Author.individual;

import com.daotingli.backendprograms.Service.Author.individual.IndividualService;
import com.daotingli.backendprograms.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class IndividualController {
    @Autowired
    private IndividualService individualService;
    /**
     * 获取用户全部信息
     */
    @RequestMapping(path = "/user/individual/getAll",method = RequestMethod.POST,params = {"username","password"})
    public Result getAll(String username, String password){
        return individualService.getAll(username,password);
    }
    /**
     * 编辑用户信息
     */
    @RequestMapping(path = "/user/individual/edit",method = RequestMethod.POST,params = {"id","username","password","identity","userphone"})
    public Result edit(int id, String username, String password, String identity, String userphone){
        return individualService.edit(id,username,password,identity,userphone);
    }

}
